package cn.echo.common.filter;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * Created by Administrator on 2017/4/13.
 * 解决中文乱码问题
 */

public class EncodingToUtf8 implements Filter {
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        HttpServletRequest newrequest=(HttpServletRequest)request;
        NewRequest req=new NewRequest(newrequest);
        chain.doFilter(req,response);
    }

    public void destroy() {

    }
}
